﻿
using FreeSql.DataAnnotations;

namespace System.IMServer.TextMessageCenter.DBModel
{
    [Table(Name = "IMMessages")]
    public class IMMessages
    {
        /// <summary>
        /// 唯一ID,不一定用这个生成器啊~我只是拿我个人类库举了个例子.算法自己写,我这个大概率也不会有问题
        /// </summary>
        [Column(IsPrimary = true)]
        public long IMMID { get; set; } = LuanNiao.Core.IDGen.GetInstance().NextId();
        /// <summary>
        /// 内容  
        /// </summary>
        public string Content { get; set; } = "";
        /// <summary>
        /// 谁发的
        /// </summary>
        public long From { get; set; }
        /// <summary>
        /// 发送人的端类型
        /// </summary>
        public string FromClientType { get; set; } = "";
        /// <summary>
        /// 给谁
        /// </summary>
        public long To { get; set; }
        /// <summary>
        /// 目标人的端类型
        /// </summary>
        public string ToClientType { get; set; } = "";
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime Created { get; set; } = DateTime.Now;
    }
}
